﻿#ifndef DOWNLOADFILEFUNC_H
#define DOWNLOADFILEFUNC_H

#include <QObject>
#include "BaseFunc.h"
#include "DataType/PortStruct.h"

class DownloadFileFunc : public BaseFunc
{
    Q_OBJECT
public:
    explicit DownloadFileFunc(QObject *parent = 0);
    enum {FunctionCode = DeviceFuntionCode::DownloadFile};

    quint8 fileType() const;
    void setFileType(const quint8 &fileType);

    QString url() const;
    void setUrl(const QString &url);

    QMap<QString, QString> paramMap() const;
    void setParamMap(const QMap<QString, QString> &paramMap);

    PortStruct source() const;
    void setSource(const PortStruct &source);

private:
    PortStruct m_source;
    quint8 m_fileType;
    QString m_url;
    QMap<QString,QString> m_paramMap;
};

#endif // DOWNLOADFILEFUNC_H
